This patch establishes a new abstraction of sharing handles (encoded as a 64bit
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 17 Dec 2009 06:27:56 +0000 (06:27 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 17 Dec 2009 06:27:56 +0000 (06:27 +0000)
commitcf5e23f6c44689bcf1996cf890b1c61c6fdb89d0
tree3adab80d2ce2331909586e3819de29f742851d29
parent3e3ccc354377859506ad948df84572813204c99c
This patch establishes a new abstraction of sharing handles (encoded as a 64bit
int), each corresponding to a single sharable pages. Externally all sharing related
operations (e.g. nominate/share) will use sharing handles, thus solving a lot of
consistency problems (like: is this sharable page still the same sharable page
as before).
Internally, sharing handles can be translated to the MFNs (using a newly created
hashtable), and then for each MFNs a doubly linked list of GFNs translating to
this MFN is maintained. Finally, sharing handle is stored in page_info strucutre
for each sharable MFN.
All this allows to share and unshare pages efficiently. However, at the moment a
single lock is used to protect the sharing handle hash table. For scalability
reasons, the locking needs to be made more granular.

Signed-off-by: Grzegorz Milos <Grzegorz.Milos@citrix.com>
xen/arch/x86/mm.c
xen/arch/x86/mm/mem_sharing.c
xen/include/asm-x86/mem_sharing.h
xen/include/asm-x86/mm.h